package com.quanyan.platform.model.resp;

import com.quanyan.club.entity.RespClubBaseInfo;
import com.quanyan.club.entity.RespPlaceClubInfo;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Created by slong.guo on 2017/3/9.
 */
public class GatherClubItemRecommend implements Serializable {
    private static final long serialVersionUID = -2180967085455000085L;

    private String CL_clubName;
    private Integer CL_clubID;
    private String CL_clubAddr;
    private String CL_clubUrl;
    private String CL_caption;
    private Integer CL_follow;
    private Integer CL_memberCnt;
    private Integer CL_distance;
    private Integer CL_isVip;
    private Integer CL_clubType;
    private List<Integer> CL_acWeekDays;

    public GatherClubItemRecommend() {
    }

    public GatherClubItemRecommend(RespPlaceClubInfo clubInfo) {
        this.CL_clubName = clubInfo.getClubName();
        this.CL_clubID = clubInfo.getClubId();
        this.CL_clubUrl = clubInfo.getClubLogo();
        if (StringUtils.isBlank(clubInfo.getClubDetail()) && clubInfo.getActivityWeeks().isEmpty()) {
            this.CL_caption = "世间竟有如此清新好玩的组织";
        } else {
            this.CL_caption = clubInfo.getClubDetail();
        }
        this.CL_follow = 0;
        this.CL_memberCnt = clubInfo.getClubMemberCount();
        this.CL_distance = 0;
        if (clubInfo.getRealNameAuth() != null && clubInfo.getRealNameAuth()) {
            this.CL_isVip = 1;
        } else {
            this.CL_isVip = 0;
        }
        this.CL_clubType = 0;
        this.CL_acWeekDays = clubInfo.getActivityWeeks();

    }

    public GatherClubItemRecommend(RespClubBaseInfo baseInfo) {
        this.CL_clubName = baseInfo.getClubName();
        this.CL_clubID = baseInfo.getClubId();
        this.CL_clubAddr = baseInfo.getResidentPlaceName();
        this.CL_clubUrl = baseInfo.getClubLogo();
        if (StringUtils.isBlank(baseInfo.getPurpose()) && baseInfo.getActivityWeekDays().isEmpty()) {
            this.CL_caption = "世间竟有如此清新好玩的组织";
        } else {
            this.CL_caption = baseInfo.getPurpose();
        }
        if (baseInfo.getJoin() != null && baseInfo.getJoin()) {
            this.CL_follow = 1;
        } else {
            this.CL_follow = 0;
        }
        this.CL_memberCnt = baseInfo.getMemberCount();
        this.CL_distance = baseInfo.getDist().intValue();
        if (baseInfo.isRealNameAuth()) {
            this.CL_isVip = 1;
        } else {
            this.CL_isVip = 0;
        }
        if (baseInfo.getClubType() != null) {
            this.CL_clubType = baseInfo.getClubType();
        }
        this.CL_acWeekDays = baseInfo.getActivityWeekDays();
    }
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getCL_clubName() {
        return CL_clubName;
    }

    public void setCL_clubName(String CL_clubName) {
        this.CL_clubName = CL_clubName;
    }

    public Integer getCL_clubID() {
        return CL_clubID;
    }

    public void setCL_clubID(Integer CL_clubID) {
        this.CL_clubID = CL_clubID;
    }

    public String getCL_clubAddr() {
        return CL_clubAddr;
    }

    public void setCL_clubAddr(String CL_clubAddr) {
        this.CL_clubAddr = CL_clubAddr;
    }

    public String getCL_clubUrl() {
        return CL_clubUrl;
    }

    public void setCL_clubUrl(String CL_clubUrl) {
        this.CL_clubUrl = CL_clubUrl;
    }

    public String getCL_caption() {
        return CL_caption;
    }

    public void setCL_caption(String CL_caption) {
        this.CL_caption = CL_caption;
    }

    public Integer getCL_follow() {
        return CL_follow;
    }

    public void setCL_follow(Integer CL_follow) {
        this.CL_follow = CL_follow;
    }

    public Integer getCL_memberCnt() {
        return CL_memberCnt;
    }

    public void setCL_memberCnt(Integer CL_memberCnt) {
        this.CL_memberCnt = CL_memberCnt;
    }

    public Integer getCL_distance() {
        return CL_distance;
    }

    public void setCL_distance(Integer CL_distance) {
        this.CL_distance = CL_distance;
    }

    public Integer getCL_isVip() {
        return CL_isVip;
    }

    public void setCL_isVip(Integer CL_isVip) {
        this.CL_isVip = CL_isVip;
    }

    public Integer getCL_clubType() {
        return CL_clubType;
    }

    public void setCL_clubType(Integer CL_clubType) {
        this.CL_clubType = CL_clubType;
    }

    public List<Integer> getCL_acWeekDays() {
        return CL_acWeekDays;
    }

    public void setCL_acWeekDays(List<Integer> CL_acWeekDays) {
        this.CL_acWeekDays = CL_acWeekDays;
    }
}
